<!DOCTYPE html>
<html>

<head>
    <title>Example</title>
    <style type="text/css">
        /* 边框的应用轮廓 短时间抓住用户对某个元素的注意力
    
    轮廓绘制在盒子边框的外面，轮廓不属于页面，轮廓不需要调整页面布局 */
        p {
            width: 30%;
            padding: 5px;
            border: medium double black;
            background-color: lightgrey;
            margin: 2px;
            float: left;
        }
        #fruittext {
            outline: thick solid red;
        }
    </style>
</head>

<body>
    <p>
        There are lots of different kinds of fruit - there are over 500 varieties
        of banana alone. By the time we add the countless types of apples, oranges,
        and other well-known fruit, we are faced with thousands of choides.
    </p>
    <p id="fruittext">
        There are lots of different kinds of fruit - there are over 500 varieties
        of banana alone. By the time we add the countless types of apples, oranges,
        and other well-known fruit, we are faced with thousands of choides.
    </p>
    <p>
        There are lots of different kinds of fruit - there are over 500 varieties
        of banana alone. By the time we add the countless types of apples, oranges,
        and other well-known fruit, we are faced with thousands of choides.
    </p>
    <button>Outline Off</button>
    <button>Outline rua</button>
    <button>Outline sa</button>
    <script>
        var buttons = document.getElementsByTagName("BUTTON");
        for (var i = 0; i < buttons.length; i++) {
            buttons[i].onclick = function(e){
                var elem = document.getElementById("fruittext");
                if(e.target.innerHTML == "Outline Off"){
                    elem.style.outline = "none";
                }else{
                    elem.style.outlineColor = "red";
                    elem.style.outlineStyle = "solid";
                    elem.style.outlineWidth = "thick";
                }
            };
        }
    </script>
</body>

</html>